package com.chzu.controller;

import com.chzu.pojo.Images;
import com.chzu.result.JsonResult;
import com.chzu.service.ImageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author lz
 * @Version 1.0
 * @Company 滁州大健康与养老产业研究院
 * @ClassName ImagesController
 * @Description TODO
 * @Date 2022/02/09 20:39
 */
@RestController
@RequestMapping("/image")
@Api(tags = "图片接口")
public class ImagesController {

    @Resource
    private ImageService imageService;

    @ApiOperation("查询所有的图片信息")
    @GetMapping("/")
    public JsonResult<Object> getAllImage() {
        List<Images> data = imageService.getAllImage();
        return JsonResult.ok(data);
    }
}
